package downpacket

import "gitee.com/yanwc/ebike-xiaoan-device/internal/field"

type BatchSetVoiceReq struct {
	Url      string     `json:"url"`
	VoiceIdx []VoiceIdx `json:"idx"`
	Type     int        `json:"type"`
	Crc      int        `json:"crc"`
}

type DeleteVoiceReq struct {
	Url string `json:"url"`
}

func NewBatchSetVoiceReq(sn field.SerialNumber, req BatchSetVoiceReq) *Req[BatchSetVoiceReq] {
	return &Req[BatchSetVoiceReq]{
		CmdWord: BatchSetVoiceCommandWord,
		MsgNo:   sn,
		Param:   req,
	}
}

func NewDeleteVoiceReq(sn field.SerialNumber) *Req[DeleteVoiceReq] {
	return &Req[DeleteVoiceReq]{
		CmdWord: BatchSetVoiceCommandWord,
		MsgNo:   sn,
		Param: DeleteVoiceReq{
			Url: "",
		},
	}
}
